package 中国矿业大学;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

import java.io.IOException;

public class KY_UNT {

    public static void main(String[] args) throws IOException {
        String Url = "https://see.cumt.edu.cn/szdw/szdw.htm";
        Document post = Jsoup.connect(Url).post();
//        System.out.println(post.text());
        for (Element detailsWrap : post.getElementsByClass("details_wrap")) {
            for (Element td : detailsWrap.getElementsByTag("td")) {
//                System.out.println(td.text());
                for (Element p : td.getElementsByTag("p")) {
//                    System.out.println(p.text());
                    if ((p.getElementsByTag("a").attr("href").length() == 0)) {
//                        System.out.print("");
                    } else {
//                        System.out.println(p.getElementsByTag("span").text());
                        System.out.println((p.getElementsByTag("a").attr("href")));
                        p.getElementsByTag("a").attr("href");
                    }
//                    System.out.println(p.getElementsByTag("a").attr("href"));
                }

            }
        }

    }
}
